#ifndef __GEOMETRY_DATA_MGR_GLES_H__
#define __GEOMETRY_DATA_MGR_GLES_H__

#pragma once

#include "RendererGLESCompileConfig.h"
#include "GeometryDataManager.h"

namespace Nezha
{

	class RendererGLES;

	class GeometryDataMgrGLES : public GeometryDataManager
	{
	public:
		GeometryDataMgrGLES(RendererGLES* r);
		~GeometryDataMgrGLES();

		virtual VertexBufferPtr createVertexBuffer(u32 vertexStride, u32 numVertex, HardwareBuffer::Usage usage,
			bool createShadowBuffer = false, float* data = NULL);

		virtual IndexBufferPtr createIndexBuffer(HardwareBuffer::Usage usage, IndexBuffer::IndexType it, u32 numIndices,
			bool createShadowBuffer = false, u16* data = NULL);

		virtual void releaseAllData();

	protected:
		virtual void _garbageDispose();

	private:
		RendererGLES* mRenderer;

		typedef PArray<VertexBufferPtr> VBArray;
		typedef PArray<IndexBufferPtr> IBArray;
		typedef PArray<SystemMemBufferPtr> SMArray;

		VBArray mVertexBuffers;
		IBArray mIndexBuffers;
		SMArray mSystemMemBuffers;
	};

}//end namespace Nezha

#endif //end __GEOMETRY_DATA_MGR_GLES_H__